Skip to content

Fix missing propagation of RoPE scaling and interpolation arguments in model builders - #2902

Closed
taehwakkwon wants to merge 2 commits into
NVIDIA:mainfrom
taehwakkwon:fix/rope_scaling
Closed

Fix missing propagation of RoPE scaling and interpolation arguments in model builders#2902
taehwakkwon wants to merge 2 commits into
NVIDIA:mainfrom
taehwakkwon:fix/rope_scaling

Conversation

@taehwakkwon

@taehwakkwon taehwakkwon commented Jan 11, 2026

Copy link
Copy Markdown

What does this PR do ?

This PR ensures that seq_len_interpolation_factor and rope_scaling_factor arguments are correctly propagated from the arguments to the model builder functions.

Previously, even if the user specified --seq-len-interpolation-factor or --rope-scaling-factor, these values were not being passed to the underlying model initialization logic.

Changes:

  1. GPT (gpt_builders.py): Added propagation for both rope_scaling_factor and seq_len_interpolation_factor.
  2. Mamba, BERT, T5: Added propagation for seq_len_interpolation_factor.

This fix allows RoPE scaling and position embedding interpolation to work as expected when configured via command-line arguments.

Contribution process

Pre-checks

  • I want this PR in a versioned release and have added the appropriate Milestone (e.g., Core 0.8)
  • I have added relevant unit tests
  • I have added relevant functional tests
  • I have added proper typing to my code Typing guidelines
  • I have added relevant documentation
  • I have run the autoformatter.sh on my PR

Code review

The following process is enforced via the CODEOWNERS file for changes into megatron/core. For changes outside of megatron/core, it is up to the PR author whether or not to tag the Final Reviewer team.

@copy-pr-bot

copy-pr-bot Bot commented Jan 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@chtruong814 chtruong814 added the needs-follow-up Issue needs follow-up label Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants